<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改用户车辆信息')" />
    <th:block th:include="include :: datetimepicker-css" />
    <th:block th:include="include :: select2-css"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-membercar-edit" th:object="${car}">
        <input name="id" th:field="*{id}" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label">车主姓名：</label>
            <div class="col-sm-8">
                <input name="name" th:field="*{name}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">联系方式：</label>
            <div class="col-sm-8">
                <input name="mobile" th:field="*{mobile}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">购车时间：</label>
            <div class="col-sm-8">
                <div class="input-group date">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    <input name="payTime" th:value="${#dates.format(car.payTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">车型选择：</label>
            <div class="col-sm-8">
                <select name="carType" class="form-control m-b">
                    <option th:each="dict : ${type}" th:text="${dict.name}" th:value="${dict.id}" th:field="*{carType}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">购车门店：</label>
            <div class="col-sm-8">
                <select name="dealerId" class="form-control m-b">
                    <option>无</option>
                    <option th:each="dict : ${dealerList}" th:text="${dict.name}" th:value="${dict.id}" th:field="*{dealerId}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">车牌：</label>
            <div class="col-sm-8">
                <input name="licensePlate" th:field="*{licensePlate}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">车架编号：</label>
            <div class="col-sm-8">
                <input name="frameNo" th:field="*{frameNo}" class="form-control" type="text">
            </div>
        </div>
        <!--<div class="form-group">-->
            <!--<label class="col-sm-3 control-label">状态:</label>-->
            <!--<div class="col-sm-8">-->
                <!--<div class="radio-box">-->
                    <!--<input type="radio" name="status" value="">-->
                    <!--<label th:for="status" th:text="未知"></label>-->
                <!--</div>-->
                <!--<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>-->
            <!--</div>-->
        <!--</div>-->
    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: select2-js"/>
<script type="text/javascript">
    var prefix = ctx + "system/member/car/membercar";
    $("#form-membercar-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-membercar-edit').serialize());
        }
    }

    $("input[name='payTime']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });
</script>
</body>
</html>